CC = gcc
LIB = -L ../include -L ../libreg\
	-L../librule \
	-L../libua \
	-lrule \
	-lua \
	-lreg \
	-lpthread \
	-lm
main:sensor_ua.o sensor_struct.o data_struct.o net.o
	$(CC) -o main sensor_ua.o sensor_struct.o data_struct.o net.o $(LIB)

sensor_ua.o:sensor_ua.c 
	$(CC) -c sensor_ua.c
sensor_struct.o:sensor_struct.c
	$(CC) -c $^
data_struct.o:data_struct.c 
	$(CC) -c $^
net.o:net.c
	$(CC) -c $^
	
clean:
	rm main *.o
